/******************** (C) COPYRIGHT 2008 STMicroelectronics ********************
* File Name          : i2c_ee.h
* Author             : MCD Application Team
* Version            : V2.0.1
* Date               : 06/13/2008
* Description        : Header for i2c_ee.c module
********************************************************************************
* THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
* WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME.
* AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT,
* INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE
* CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING
* INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
*******************************************************************************/
/* Define to prevent recursive inclusion ------------------------------------ */
#ifndef __I2C_EE_H
#define __I2C_EE_H

/* Includes ------------------------------------------------------------------*/
//#include "stm32f10x_lib.h"
#include "stm32f10x.h"

/* Exported types ------------------------------------------------------------*/
/* Exported constants --------------------------------------------------------*/

#define EEPROM_ADDRESS_1 0xA2
#define EEPROM_ADDRESS_2 0xA0




/* Exported macro ------------------------------------------------------------*/
/* Exported functions ------------------------------------------------------- */

void I2C_EE_ByteWrite(I2C_TypeDef *I2Cx, u8 EepromAddr, u8 *pBuffer, u16 WriteAddr);
void I2C_EE_PageWrite(I2C_TypeDef *I2Cx, u8 EepromAddr, u8 *pBuffer, u16 WriteAddr, u8 NumByteToWrite);
void I2C_EE_BufferWrite(I2C_TypeDef *I2Cx, u8 EepromAddr, u8 *pBuffer, u16 WriteAddr, u16 NumByteToWrite);
void I2C_EE_BufferRead(I2C_TypeDef *I2Cx, u8 EepromAddr, u8 *pBuffer, u16 ReadAddr, u16 NumByteToRead);
void I2C_EE_WaitEepromStandbyState(I2C_TypeDef *I2Cx, u8 EepromAddr);

void I2C_EE_ByteWrite_Board(I2C_TypeDef *I2Cx, u8 EepromAddr, u8 *pBuffer, u16 WriteAddr);
void I2C_EE_PageWrite_Board(I2C_TypeDef *I2Cx, u8 EepromAddr, u8 *pBuffer, u16 WriteAddr, u8 NumByteToWrite);
void I2C_EE_BufferWrite_Board(I2C_TypeDef *I2Cx, u8 EepromAddr, u8 *pBuffer, u16 WriteAddr, u16 NumByteToWrite);
void I2C_EE_BufferRead_Board(I2C_TypeDef *I2Cx, u8 EepromAddr, u8 *pBuffer, u16 ReadAddr, u16 NumByteToRead);
void I2C_EE_WaitEepromStandbyState_Board(I2C_TypeDef *I2Cx, u8 EepromAddr);

#endif /* __I2C_EE_H */

/******************* (C) COPYRIGHT 2008 STMicroelectronics *****END OF FILE****/


